Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(cli): deployer should wait for prereq txs #3113

Merged
merged 5 commits into from
Sep 1, 2024
Merged

Conversation

holic
Copy link
Member

@holic holic commented Sep 1, 2024

we're seeing issues in garnet where registering function selectors fails

  mud:cli:deploy found CREATE2 deployer at 0x4e59b44847b379578588920ca78fbf26c0b4956c +0ms
  mud:cli:deploy found balance transfer system at 0xA274B9a7E743cd8dF3c6Fd0aBD47eD55Fc943BC3 +63ms
  mud:cli:deploy found batch call system at 0x53E5c08d82A377167069Ade46d087Ab753538608 +1ms
  mud:cli:deploy found access management system at 0x17ffDEfF94ed0b80c493A179d4B3b09D6d71f627 +13ms
  mud:cli:deploy found core module at 0xDa4E062e8C69D39d9472945232a53F579904AC45 +5ms
  mud:cli:deploy found core registration system at 0xd416f26aafcaaECa50b0dC35bd023e7286BE2961 +6ms
  mud:cli:deploy found world factory at 0x573802f86c51B61d7Cf620952217eC6Ce0537d2E +34ms
  mud:cli:deploy found app__TasksSystem system at 0x6F8B474d9d54086ff1C527ff31eeb463c688E5A6 +55ms
  mud:cli:deploy found balance transfer system at 0xA274B9a7E743cd8dF3c6Fd0aBD47eD55Fc943BC3 +68ms
  mud:cli:deploy found batch call system at 0x53E5c08d82A377167069Ade46d087Ab753538608 +1ms
  mud:cli:deploy found access management system at 0x17ffDEfF94ed0b80c493A179d4B3b09D6d71f627 +14ms
  mud:cli:deploy found core registration system at 0xd416f26aafcaaECa50b0dC35bd023e7286BE2961 +4ms
  mud:cli:deploy found core module at 0xDa4E062e8C69D39d9472945232a53F579904AC45 +2ms
  mud:cli:deploy found world factory at 0x573802f86c51B61d7Cf620952217eC6Ce0537d2E +5ms
  mud:cli:deploy deploying world +0ms
  mud:common:createNonceManager reset nonce to 154 +0ms
  mud:common:writeContract calling deployWorld with nonce 154 at 0x573802f86c51B61d7Cf620952217eC6Ce0537d2E +0ms
  mud:cli:deploy waiting for world deploy +258ms
  mud:cli:deploy deployed world to 0x9db9c8f160ca970f29b6e4a84c95c617f681a8c5 at block 6506437n +4s
  mud:cli:deploy looking up resource IDs for 0x9db9c8f160ca970f29b6e4a84c95c617f681a8c5 +0ms
  mud:cli:deploy found 22 resource IDs for 0x9db9c8f160ca970f29b6e4a84c95c617f681a8c5 +38ms
  mud:cli:deploy found 3 existing namespaces: store, world, <root> +0ms
  mud:cli:deploy registering namespaces app +0ms
  mud:common:writeContract calling registerNamespace with nonce 155 at 0x9db9c8f160ca970f29b6e4a84c95c617f681a8c5 +4s
  mud:cli:deploy waiting for all namespace registration transactions to confirm +142ms
  mud:cli:deploy looking up tables for 0x9db9c8f160ca970f29b6e4a84c95c617f681a8c5 +4s
  mud:cli:deploy found 15 tables for 0x9db9c8f160ca970f29b6e4a84c95c617f681a8c5 +52ms
  mud:cli:deploy registering tables app__Tasks +0ms
  mud:common:writeContract calling registerTable with nonce 156 at 0x9db9c8f160ca970f29b6e4a84c95c617f681a8c5 +4s
  mud:cli:deploy looking up resource IDs for 0x9db9c8f160ca970f29b6e4a84c95c617f681a8c5 +202ms
  mud:world looking up function selectors for 0x9db9c8f160ca970f29b6e4a84c95c617f681a8c5 +0ms
  mud:cli:deploy looking up resource access for 0x9db9c8f160ca970f29b6e4a84c95c617f681a8c5 +1ms
  mud:cli:deploy looking up resource access for 0x9db9c8f160ca970f29b6e4a84c95c617f681a8c5 +0ms
  mud:cli:deploy found 22 resource IDs for 0x9db9c8f160ca970f29b6e4a84c95c617f681a8c5 +39ms
  mud:world found 22 function selectors for 0x9db9c8f160ca970f29b6e4a84c95c617f681a8c5 +49ms
  mud:world looking up function signatures for 0x9db9c8f160ca970f29b6e4a84c95c617f681a8c5 +0ms
  mud:world found 44 function signatures for 0x9db9c8f160ca970f29b6e4a84c95c617f681a8c5 +76ms
  mud:cli:deploy found 7 resource<>address access pairs +94ms
  mud:cli:deploy found 7 resource<>address access pairs +5ms
  mud:cli:deploy looking up systems AccessManagement, BalanceTransfer, BatchCall, Registration +0ms
  mud:cli:deploy registering new systems app__TasksSystem +40ms
  mud:cli:deploy found app__TasksSystem system at 0x6F8B474d9d54086ff1C527ff31eeb463c688E5A6 +36ms
  mud:common:writeContract calling registerSystem with nonce 157 at 0x9db9c8f160ca970f29b6e4a84c95c617f681a8c5 +360ms
  mud:world looking up function selectors for 0x9db9c8f160ca970f29b6e4a84c95c617f681a8c5 +229ms
  mud:world found 22 function selectors for 0x9db9c8f160ca970f29b6e4a84c95c617f681a8c5 +58ms
  mud:world looking up function signatures for 0x9db9c8f160ca970f29b6e4a84c95c617f681a8c5 +1ms
  mud:world found 44 function signatures for 0x9db9c8f160ca970f29b6e4a84c95c617f681a8c5 +48ms
  mud:cli:deploy registering functions: app__addTask(string), app__completeTask(bytes32), app__deleteTask(bytes32), app__resetTask(bytes32) +248ms
  mud:cli:deploy failed to register function app__completeTask(bytes32), retrying in 500ms... +117ms
  mud:cli:deploy failed to register function app__deleteTask(bytes32), retrying in 500ms... +78ms
  mud:cli:deploy failed to register function app__resetTask(bytes32), retrying in 500ms... +42ms
  mud:cli:deploy failed to register function app__addTask(string), retrying in 500ms... +94ms
  mud:common:writeContract calling registerFunctionSelector with nonce 158 at 0x9db9c8f160ca970f29b6e4a84c95c617f681a8c5 +2s
  mud:common:writeContract calling registerFunctionSelector with nonce 159 at 0x9db9c8f160ca970f29b6e4a84c95c617f681a8c5 +110ms
  mud:common:writeContract calling registerFunctionSelector with nonce 160 at 0x9db9c8f160ca970f29b6e4a84c95c617f681a8c5 +60ms
  mud:common:writeContract calling registerFunctionSelector with nonce 161 at 0x9db9c8f160ca970f29b6e4a84c95c617f681a8c5 +75ms
  mud:cli:deploy waiting for all transactions to confirm +2s

sounds like this may be due to gas estimates not working for OPStack chains?

eventually it succeeds due to retries, but this isn't the intent

Copy link

changeset-bot bot commented Sep 1, 2024

🦋 Changeset detected

Latest commit: 9e584cf

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 27 packages
Name Type
@latticexyz/cli Patch
@latticexyz/world-modules Patch
mock-game-contracts Patch
@latticexyz/abi-ts Patch
@latticexyz/block-logs-stream Patch
@latticexyz/common Patch
@latticexyz/config Patch
create-mud Patch
@latticexyz/dev-tools Patch
@latticexyz/explorer Patch
@latticexyz/faucet Patch
@latticexyz/gas-report Patch
@latticexyz/protocol-parser Patch
@latticexyz/query Patch
@latticexyz/react Patch
@latticexyz/recs Patch
@latticexyz/schema-type Patch
solhint-config-mud Patch
solhint-plugin-mud Patch
@latticexyz/stash Patch
@latticexyz/store-indexer Patch
@latticexyz/store-sync Patch
@latticexyz/store Patch
@latticexyz/utils Patch
@latticexyz/world-module-metadata Patch
@latticexyz/world Patch
ts-benchmarks Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@holic holic marked this pull request as ready for review September 1, 2024 10:15
@holic holic requested a review from alvrs as a code owner September 1, 2024 10:15
@holic
Copy link
Member Author

holic commented Sep 1, 2024

deploying to garnet now looks like

  mud:cli:deploy found CREATE2 deployer at 0x4e59b44847b379578588920ca78fbf26c0b4956c +0ms
  mud:cli:deploy found balance transfer system at 0xA274B9a7E743cd8dF3c6Fd0aBD47eD55Fc943BC3 +74ms
  mud:cli:deploy found batch call system at 0x53E5c08d82A377167069Ade46d087Ab753538608 +1ms
  mud:cli:deploy found access management system at 0x17ffDEfF94ed0b80c493A179d4B3b09D6d71f627 +7ms
  mud:cli:deploy found core registration system at 0xd416f26aafcaaECa50b0dC35bd023e7286BE2961 +4ms
  mud:cli:deploy found world factory at 0x573802f86c51B61d7Cf620952217eC6Ce0537d2E +11ms
  mud:cli:deploy found core module at 0xDa4E062e8C69D39d9472945232a53F579904AC45 +11ms
  mud:cli:deploy found app__TasksSystem system at 0x6F8B474d9d54086ff1C527ff31eeb463c688E5A6 +61ms
  mud:cli:deploy found core registration system at 0xd416f26aafcaaECa50b0dC35bd023e7286BE2961 +58ms
  mud:cli:deploy found batch call system at 0x53E5c08d82A377167069Ade46d087Ab753538608 +23ms
  mud:cli:deploy found balance transfer system at 0xA274B9a7E743cd8dF3c6Fd0aBD47eD55Fc943BC3 +6ms
  mud:cli:deploy found access management system at 0x17ffDEfF94ed0b80c493A179d4B3b09D6d71f627 +8ms
  mud:cli:deploy found core module at 0xDa4E062e8C69D39d9472945232a53F579904AC45 +1ms
  mud:cli:deploy found world factory at 0x573802f86c51B61d7Cf620952217eC6Ce0537d2E +9ms
  mud:cli:deploy deploying world +0ms
  mud:common:createNonceManager reset nonce to 221 +0ms
  mud:common:writeContract calling deployWorld at 0x573802f86c51B61d7Cf620952217eC6Ce0537d2E with nonce 221 +0ms
  mud:cli:deploy waiting for world deploy +266ms
  mud:cli:deploy deployed world to 0xfeeaafd3dfb8c456d363e509a3e55141c5df59d4 at block 6507997n +4s
  mud:cli:deploy looking up resource IDs for 0xfeeaafd3dfb8c456d363e509a3e55141c5df59d4 +0ms
  mud:cli:deploy found 22 resource IDs for 0xfeeaafd3dfb8c456d363e509a3e55141c5df59d4 +39ms
  mud:cli:deploy found 3 existing namespaces: store, world, <root> +0ms
  mud:cli:deploy registering namespaces: app +0ms
  mud:common:writeContract calling registerNamespace at 0xfeeaafd3dfb8c456d363e509a3e55141c5df59d4 with nonce 222 +4s
  mud:cli:deploy waiting for namespace registrations to confirm +136ms
  mud:cli:deploy looking up tables for 0xfeeaafd3dfb8c456d363e509a3e55141c5df59d4 +4s
  mud:cli:deploy found 15 tables for 0xfeeaafd3dfb8c456d363e509a3e55141c5df59d4 +33ms
  mud:cli:deploy registering tables: app__Tasks +0ms
  mud:common:writeContract calling registerTable at 0xfeeaafd3dfb8c456d363e509a3e55141c5df59d4 with nonce 223 +4s
  mud:cli:deploy looking up resource IDs for 0xfeeaafd3dfb8c456d363e509a3e55141c5df59d4 +169ms
  mud:world looking up function selectors for 0xfeeaafd3dfb8c456d363e509a3e55141c5df59d4 +0ms
  mud:cli:deploy looking up resource access for 0xfeeaafd3dfb8c456d363e509a3e55141c5df59d4 +12ms
  mud:cli:deploy looking up resource access for 0xfeeaafd3dfb8c456d363e509a3e55141c5df59d4 +0ms
  mud:cli:deploy found 22 resource IDs for 0xfeeaafd3dfb8c456d363e509a3e55141c5df59d4 +42ms
  mud:world found 22 function selectors for 0xfeeaafd3dfb8c456d363e509a3e55141c5df59d4 +60ms
  mud:world looking up function signatures for 0xfeeaafd3dfb8c456d363e509a3e55141c5df59d4 +0ms
  mud:cli:deploy found 7 resource<>address access pairs +66ms
  mud:world found 44 function signatures for 0xfeeaafd3dfb8c456d363e509a3e55141c5df59d4 +61ms
  mud:cli:deploy found 7 resource<>address access pairs +32ms
  mud:cli:deploy looking up systems: AccessManagement, BalanceTransfer, BatchCall, Registration +0ms
  mud:cli:deploy registering new systems: app__TasksSystem +43ms
  mud:cli:deploy found app__TasksSystem system at 0x6F8B474d9d54086ff1C527ff31eeb463c688E5A6 +35ms
  mud:common:writeContract calling registerSystem at 0xfeeaafd3dfb8c456d363e509a3e55141c5df59d4 with nonce 224 +431ms
  mud:cli:deploy waiting for table and system registrations to confirm +135ms
  mud:world looking up function selectors for 0xfeeaafd3dfb8c456d363e509a3e55141c5df59d4 +4s
  mud:world found 22 function selectors for 0xfeeaafd3dfb8c456d363e509a3e55141c5df59d4 +62ms
  mud:world looking up function signatures for 0xfeeaafd3dfb8c456d363e509a3e55141c5df59d4 +1ms
  mud:world found 44 function signatures for 0xfeeaafd3dfb8c456d363e509a3e55141c5df59d4 +51ms
  mud:cli:deploy registering functions: app__addTask(string), app__completeTask(bytes32), app__deleteTask(bytes32), app__resetTask(bytes32) +4s
  mud:common:writeContract calling registerFunctionSelector at 0xfeeaafd3dfb8c456d363e509a3e55141c5df59d4 with nonce 225 +4s
  mud:common:writeContract calling registerFunctionSelector at 0xfeeaafd3dfb8c456d363e509a3e55141c5df59d4 with nonce 226 +63ms
  mud:common:writeContract calling registerFunctionSelector at 0xfeeaafd3dfb8c456d363e509a3e55141c5df59d4 with nonce 227 +132ms
  mud:common:writeContract calling registerFunctionSelector at 0xfeeaafd3dfb8c456d363e509a3e55141c5df59d4 with nonce 228 +102ms
  mud:cli:deploy found MetadataModule module at 0x2FF959C7D78A64356C28Bcf5F6E3cD56f1463901 +516ms
  mud:cli:deploy installing modules: MetadataModule +0ms
  mud:common:writeContract calling installModule at 0xfeeaafd3dfb8c456d363e509a3e55141c5df59d4 with nonce 229 +211ms
  mud:cli:deploy waiting for metadata module installation to confirm +139ms
  mud:cli:deploy setting 4 resource tags +4s
  mud:cli:deploy tagging table:app:Tasks with label: "Tasks" +1ms
  mud:cli:deploy tagging system:app:TasksSystem with label: "TasksSystem" +2ms
  mud:cli:deploy tagging system:app:TasksSystem with abi: "function addTask(string description) returns (bytes32 id)\nfunction completeTask(bytes32 id)\nfunction deleteTask(bytes32 id)\nfunction resetTask(bytes32 id)" +0ms
  mud:cli:deploy tagging system:app:TasksSystem with worldAbi: "function app__addTask(string description) returns (bytes32 id)\nfunction app__completeTask(bytes32 id)\nfunction app__deleteTask(bytes32 id)\nfunction app__resetTask(bytes32 id)" +0ms
  mud:common:writeContract calling metadata__setResourceTag at 0xfeeaafd3dfb8c456d363e509a3e55141c5df59d4 with nonce 230 +4s
  mud:common:writeContract calling metadata__setResourceTag at 0xfeeaafd3dfb8c456d363e509a3e55141c5df59d4 with nonce 231 +64ms
  mud:common:writeContract calling metadata__setResourceTag at 0xfeeaafd3dfb8c456d363e509a3e55141c5df59d4 with nonce 232 +133ms
  mud:common:writeContract calling metadata__setResourceTag at 0xfeeaafd3dfb8c456d363e509a3e55141c5df59d4 with nonce 233 +87ms
  mud:cli:deploy waiting for remaining transactions to confirm +500ms
  mud:cli:deploy deploy complete +5s

@holic holic merged commit 0738d29 into main Sep 1, 2024
15 checks passed
@holic holic deleted the holic/deployer-wait branch September 1, 2024 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant